﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ControlNhanHieu.ascx.cs" Inherits="WebUserControl_ControlNganhHang" %>
  <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>


<%@ Register src="uscMsgBox.ascx" tagname="uscMsgBox" tagprefix="uc1" %>


<link rel="stylesheet" href='<%=ResolveUrl("~/LayoutCss/K_BaoCaoFormLayout.css")%>' type="text/css" />


<script type="text/javascript">
     function pageLoad() {
      $("#<%= ImgNew.ClientID %>").click(function() { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
        } });
});
$("#<%= btFind.ClientID %>").click(function () {
    $.blockUI({
        message: '<h1>Xin vui lòng chờ xử lý</h1>',
        css: {
            border: 'none',
            padding: '15px',
            backgroundColor: '#f00',
            opacity: .5,
            color: '#fff'
        }
    });
});
        $("#<%= ImgFind.ClientID %>").click(function () { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
        } }); 
       
        }); 
          $("#<%= ImgSave.ClientID %>").click(function() { 
          if ($("#<%= TxtMaNhanHieu.ClientID %>").val().length>0)
       {
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
        } });
        } 
        }); 
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
                function EndRequestHandler(sender, args) {
                        $.unblockUI();
                }
        }  
   
</script>   
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
         <fieldset>
            <legend>Khai báo nhãn hiệu</legend>
        </fieldset>
            <asp:Panel ID="Panel1" runat="server" BackColor="#EBEBEB" 
                    BorderStyle="None" Height="33px" Width="100%">
                    <asp:ImageButton ID="ImgNew" runat="server" CausesValidation="False" 
                        Height="25px" Width="25px" ImageUrl="~/image/New File.png" OnClick="ImgNew_Click" 
                        ToolTip="Tạo mới" />
                    &nbsp;<asp:ImageButton ID="ImgSave" runat="server" ImageUrl="~/image/Save.png" 
                        OnClick="ImgSave_Click" Height="25px" Width="25px" ToolTip="Lưu thông tin" />
                         &nbsp;<asp:ImageButton ID="ImgFind" runat="server" Height="25px" 
                        ImageUrl="~/image/Find.png" Width="25px"  CausesValidation="false"
                        ToolTip="Tìm kiếm" onclick="ImgFind_Click" />
                </asp:Panel>
        <br />
        <cc1:TabContainer ID="TabContainer1" runat="server" 
            ActiveTabIndex="0" Height="300px" Width="100%" BackColor="#CCFFFF" 
            Font-Names="Arial">
            <cc1:TabPanel ID="TabPanel1" runat="server" HeaderText="Nhãn hiệu" TabIndex="0">
            <ContentTemplate> 
            <fieldset>
                 <div class="fm-req">
                       <label for="TxtMaNganhHang">Mã nhãn hiệu:</label> 
                            <asp:TextBox ID="TxtMaNhanHieu" Text="auto" runat="server" ReadOnly="true" BackColor="Yellow"></asp:TextBox>
                           
                 </div>
                 <div class="fm-req">
                       <label for="TxtMaNganhHang">Mô tả nhãn hiệu</label>               
                       <asp:TextBox ID="txtMoTa" runat="server"  TabIndex="1" Width="200px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                ErrorMessage="Mã nhãn hiệu không được để trống" ControlToValidate="txtMoTa" Display="None"></asp:RequiredFieldValidator>
                            <cc1:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" 
                                TargetControlID="RequiredFieldValidator1" Enabled="True">
                            </cc1:ValidatorCalloutExtender>
               </div>
               </fieldset>
            </ContentTemplate>
            </cc1:TabPanel>
            <cc1:TabPanel ID="TabPanel2" runat="server" HeaderText="Tìm kiếm" TabIndex="1">
                <ContentTemplate>
                    <fieldset>                       
                      <div class="fm-req">
                       <label for="TxtMaNganhHang">Nhập thông tin cần tìm:</label> 
                                <asp:TextBox ID="txtFind" runat="server" Width="200px"></asp:TextBox>
                                <asp:Button ID="btFind" runat="server" Width="100px" Text="Tìm kiếm" CausesValidation="false" 
                            onclick="btFind_Click" />
                     </div>
                     </fieldset>
                              <br />
                                <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                                    AutoGenerateColumns="False" BackColor="#DEBA84" BorderColor="#DEBA84" 
                                    BorderStyle="None" BorderWidth="1px" CellPadding="3" CellSpacing="2" 
                                    DataKeyNames="inclasskey" onrowcommand="GridView1_RowCommand" PageSize="5" 
                                    Width="306px" onpageindexchanging="GridView1_PageIndexChanging">
                                    <Columns>
                                        <asp:BoundField DataField="inclasskey" HeaderText="Mã nhãn hiệu" />
                                        <asp:BoundField DataField="description" HeaderText="Mô tả" />
                                        <asp:TemplateField HeaderText="Chọn">
                                            <ItemTemplate>
                                                <asp:ImageButton ID="ImageButton2" runat="server" CausesValidation="False" 
                                                    CommandName="chon" Height="20px" Width="20px" ImageUrl="~/image/Symbol-Check.png" />
                                            </ItemTemplate>
                                            <ControlStyle BackColor="White" BorderColor="White" />
                                            <FooterStyle BackColor="White" BorderColor="White" />
                                            <HeaderStyle BackColor="White" BorderColor="White" />
                                            <ItemStyle BackColor="White" BorderColor="White" />
                                        </asp:TemplateField>
                                    </Columns>
                                    <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
                                    <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
                                    <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
                                    <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
                                    <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
                                </asp:GridView>
                           
                </ContentTemplate>
            </cc1:TabPanel>
        </cc1:TabContainer>
        
        
        
    </ContentTemplate>
</asp:UpdatePanel>
<uc1:uscMsgBox ID="uscMsgBox1" runat="server" />

